var Settings = require('./settings');
var Db = require('mongodb').Db;

var Server = require('mongodb').Server; 

var db = new Db(Settings.DB, new Server(Settings.HOST, Settings.PORT, {
	auto_reconnect:true, 
	native_parser: true,
	// journal:true,
	// fsync:true,
	// w:1
    }),{safe:true});
 
 module.exports = db;

 //session的设置实际为连接数据库